<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IBustObservedPath</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="IBust Reference Manual">
<link rel="up" href="ch04.html" title="Configuration">
<link rel="prev" href="IBustConfigService.html" title="IBustConfigService">
<link rel="next" href="ibust-ibustversion.html" title="ibustversion">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="IBustConfigService.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">IBust Reference Manual</th>
<td><a accesskey="n" href="ibust-ibustversion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#IBustObservedPath.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#IBustObservedPath.description" class="shortcut">Description</a>
                   | 
                  <a href="#IBustObservedPath.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="IBustObservedPath"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="IBustObservedPath.top_of_page"></a>IBustObservedPath</span></h2>
<p>IBustObservedPath — Path object of IBust.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="IBustObservedPath.stability-level"></a><h2>Stability Level</h2>
Stable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="IBustObservedPath.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct              <a class="link" href="IBustObservedPath.html#IBustObservedPath-struct" title="struct IBustObservedPath">IBustObservedPath</a>;
struct              <a class="link" href="IBustObservedPath.html#IBustObservedPathClass" title="struct IBustObservedPathClass">IBustObservedPathClass</a>;
<span class="returnvalue">gboolean</span>            <a class="link" href="IBustObservedPath.html#ibust-observed-path-check-modification" title="ibust_observed_path_check_modification ()">ibust_observed_path_check_modification</a>
                                                        (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>);
<a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="returnvalue">IBustObservedPath</span></a> *  <a class="link" href="IBustObservedPath.html#ibust-observed-path-new" title="ibust_observed_path_new ()">ibust_observed_path_new</a>              (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill_stat</code></em>);
<a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="returnvalue">IBustObservedPath</span></a> *  <a class="link" href="IBustObservedPath.html#ibust-observed-path-new-from-xml-node" title="ibust_observed_path_new_from_xml_node ()">ibust_observed_path_new_from_xml_node</a>
                                                        (<em class="parameter"><code><a class="link" href="ibust-ibustxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill_stat</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="IBustObservedPath.html#ibust-observed-path-output" title="ibust_observed_path_output ()">ibust_observed_path_output</a>           (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">GString</span> *output</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> indent</code></em>);
<span class="returnvalue">GList</span> *             <a class="link" href="IBustObservedPath.html#ibust-observed-path-traverse" title="ibust_observed_path_traverse ()">ibust_observed_path_traverse</a>         (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> dir_only</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="IBustObservedPath.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GObject
   +----GInitiallyUnowned
         +----<a class="link" href="IBustObject.html" title="IBustObject">IBustObject</a>
               +----<a class="link" href="IBustSerializable.html" title="IBustSerializable">IBustSerializable</a>
                     +----IBustObservedPath
</pre>
</div>
<div class="refsect1">
<a name="IBustObservedPath.description"></a><h2>Description</h2>
<p>
IBustObservedPath provides methods for file path manipulation,
such as monitor modification, directory tree traversal.
</p>
</div>
<div class="refsect1">
<a name="IBustObservedPath.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="IBustObservedPath-struct"></a><h3>struct IBustObservedPath</h3>
<pre class="programlisting">struct IBustObservedPath {
    gchar *path;
    glong mtime;
    gboolean is_dir;
    gboolean is_exist;
};
</pre>
<p>
Data structure of IBustObservedPath.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><span class="type">gchar</span> *<em class="structfield"><code><a name="IBustObservedPath-struct.path"></a>path</code></em>;</span></p></td>
<td>Path to be handled.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">glong</span> <em class="structfield"><code><a name="IBustObservedPath-struct.mtime"></a>mtime</code></em>;</span></p></td>
<td>Modified time.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gboolean</span> <em class="structfield"><code><a name="IBustObservedPath-struct.is-dir"></a>is_dir</code></em>;</span></p></td>
<td>Whether the file is the path directory.</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">gboolean</span> <em class="structfield"><code><a name="IBustObservedPath-struct.is-exist"></a>is_exist</code></em>;</span></p></td>
<td>Whether the file exists.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="IBustObservedPathClass"></a><h3>struct IBustObservedPathClass</h3>
<pre class="programlisting">struct IBustObservedPathClass {
    IBustSerializableClass parent;

    /* class members */
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ibust-observed-path-check-modification"></a><h3>ibust_observed_path_check_modification ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            ibust_observed_path_check_modification
                                                        (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>);</pre>
<p>
Checks whether the path is modified by comparing the mtime in object and mtime in file system.
Returns TRUE if imtime is changed, otherwise FALSE.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>An IBustObservedPath.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if mtime is changed; FALSE otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-observed-path-new"></a><h3>ibust_observed_path_new ()</h3>
<pre class="programlisting"><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="returnvalue">IBustObservedPath</span></a> *  ibust_observed_path_new              (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill_stat</code></em>);</pre>
<p>
New an IBustObservedPath from an XML node.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>The path string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill_stat</code></em> :</span></p></td>
<td>Auto-fill the path status.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated IBustObservedPath.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-observed-path-new-from-xml-node"></a><h3>ibust_observed_path_new_from_xml_node ()</h3>
<pre class="programlisting"><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="returnvalue">IBustObservedPath</span></a> *  ibust_observed_path_new_from_xml_node
                                                        (<em class="parameter"><code><a class="link" href="ibust-ibustxml.html#XMLNode" title="XMLNode"><span class="type">XMLNode</span></a> *node</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> fill_stat</code></em>);</pre>
<p>
New an IBustObservedPath from an XML node.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>node</code></em> :</span></p></td>
<td>An XML node that contain path.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>fill_stat</code></em> :</span></p></td>
<td>Auto-fill the path status.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated IBustObservedPath.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-observed-path-output"></a><h3>ibust_observed_path_output ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                ibust_observed_path_output           (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">GString</span> *output</code></em>,
                                                         <em class="parameter"><code><span class="type">gint</span> indent</code></em>);</pre>
<p>
Append the observed path to a string with following format:
&lt;path mtime="&lt;i&gt;modified time&lt;/i&gt;" &gt;&lt;i&gt;path&lt;/i&gt;&lt;/path&gt;
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>An IBustObservedPath.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>output</code></em> :</span></p></td>
<td>Path is appended to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>indent</code></em> :</span></p></td>
<td>number of indent.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="ibust-observed-path-traverse"></a><h3>ibust_observed_path_traverse ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *             ibust_observed_path_traverse         (<em class="parameter"><code><a class="link" href="IBustObservedPath.html" title="IBustObservedPath"><span class="type">IBustObservedPath</span></a> *path</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> dir_only</code></em>);</pre>
<p>
Recursively traverse the path and put the files and subdirectory in to a newly allocated
GLists, if the <em class="parameter"><code>path</code></em> is a directory. Otherwise returns NULL.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>An IBustObservedPath.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dir_only</code></em> :</span></p></td>
<td>Only looks for subdirs, not files</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocate GList which holds content in path; NULL if <em class="parameter"><code>path</code></em> is not directory. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> IBustObservedPath]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>